package com.example.demo.ai.llm.service;

import com.jfinal.kit.Kv;
import org.noear.solon.annotation.Component;
import org.noear.solon.flow.ChainContext;
import org.noear.solon.flow.Node;
import org.noear.solon.flow.TaskComponent;

/**
 * @author airhead
 */
@Component("resultTask")
public class ResultTask implements TaskComponent {
  @Override
  public void run(ChainContext context, Node node) throws Throwable {
    Kv kv = context.get("result");
    kv.set("result", context.get("prompt"));
  }
}
